<%= simple_form_for @membership, :url => dashboard_membership_path, remote: true, html: { class: "storytime-modal-form", data: { redirect: "index" } } do |f| %>
  <div class="scroll-panel">
    <div class="scroll-panel-header">
      <%= link_to icon("angle-left"), [:dashboard, :memberships], class: "btn btn-sm btn-default pull-left storytime-modal-trigger", remote: true %>
      <%= f.submit "Save", class: "btn btn-sm btn-primary btn-outline pull-right" %>
      <h3 class="scroll-panel-title">
        <%= t('dashboard.users.edit_user_header') %>
      </h3>
    </div>
    <div class="scroll-panel-body">

      <%= render 'storytime/dashboard/settings_tabs.html.erb' %>
      
      <input type="hidden" value="<%= params[:controller].camelize %>" id="storytime-modal-controller">
      <input type="hidden" value="<%= params[:action].camelize %>" id="storytime-modal-action">
      
      <%= f.simple_fields_for :user do |uf| %>
        <%= uf.input :storytime_name %>
        <%= uf.input :email %>
      <% end %>

      <%= f.association :storytime_role, include_blank: false, label_method: :label, input_html: { disabled: @user == @current_storytime_site.creator } %>
    </div>
  </div>
<% end %>